#include "UniformsLib.h"
POCELAIN_NAMESPACE_BEGIN
UniformsLib::lib_t UniformsLib::smLib = {
    {
     "common" , {
                {"diffuse" ,new Uniform<Vector3>(Vector3(1.0,1.0,1.0))},
                {"opacity" ,new Uniform<float>(1.0) },
                {"map" , new Uniform<float>(0.0) },		//texture
                {"uvTransform",new Uniform<Matrix3>() },
                {"uv2Transform", new Uniform< Matrix3>()},
                {"alphaMap", new Uniform<float>() },	//texture
                {"alphaTest", new Uniform<float>() }
               }
    },
    {
        "specularmap",{
            {"specularMap" ,new Uniform<float>() } //texture
        },
     },
    {
        "envmap",{
            {"envMap", new Uniform<float>()},	//texture
            {"flipEnvMap", new Uniform<float>(- 1)},
            {"reflectivity", new Uniform<float>(1.0 )}, // basic, lambert, phong
            {"ior", new Uniform<float>(1.5)}, 			// physical
            {"refractionRatio", new Uniform<float>(0.98)}, // basic, lambert, phong
        },
     },
    {
     "aomap",{
               {"aoMap",new Uniform<float>()},//texture
               {"aoMapIntensity", new Uniform<float>(1) }

              }
    },
    {
        "lightmap", {
            {"lightMap",new Uniform<float>()},		//texture
            {"lightMapIntensity",new Uniform<float>(1)},
         },
     },
    {
        "emissivemap", {
            {"emissiveMap",new Uniform<float>()},
         },
     },
    {
        "bumpmap", {
         {"bumpMap",new Uniform<float>()},			//texture
         {"bumpScale",new Uniform<float>(1) }
        },
     },
    {
        "normalmap",{
         {"normalMap", new Uniform<float>()},		//texture
         {"normalScale",new Uniform<Vector2>(Vector2( 1, 1 ))}
        },
     },
    {
        "displacementmap",{
         {"displacementMap" ,new Uniform<float>() },	//texture
         {"displacementScale",new Uniform<float>(1) },
         {"displacementBias",new Uniform<float>(0) }
        },
     },
    {
        "roughnessmap",{
         {"roughnessMap",new Uniform<float>() }
        },
    },
    {
        "metalnessmap",{
         {"metalnessMap", new Uniform<float>() }
        },
    },
    {
        "gradientmap", {
         {"gradientMap",new Uniform<float>() }
        },
    },
    {
        "fog",{
         {"fogDensity", new Uniform<float>(0.00025)},
         {"fogNear", new Uniform<float>(1) },
         {"fogFar", new Uniform<float>(2000)},
         {"fogColor", new Uniform<Vector3>(Vector3(1.0,1.0,1.0)) }
        },
    },

    ////        lights: {
    ////            ambientLightColor: { value: [] },
    ////            lightProbe: { value: [] },
    ////            directionalLights: { value: [], properties: {
    ////                                    direction: {},
    ////                                    color: {}
    ////                                } },
    ////            directionalLightShadows: { value: [], properties: {
    ////                                          shadowBias: {},
    ////                                          shadowNormalBias: {},
    ////                                          shadowRadius: {},
    ////                                          shadowMapSize: {}
    ////                                      } },

    ////            directionalShadowMap: { value: [] },
    ////            directionalShadowMatrix: { value: [] },

    ////            spotLights: { value: [], properties: {
    ////                             color: {},
    ////                             position: {},
    ////                             direction: {},
    ////                             distance: {},
    ////                             coneCos: {},
    ////                             penumbraCos: {},
    ////                             decay: {}
    ////                         } },

    ////            spotLightShadows: { value: [], properties: {
    ////                                   shadowBias: {},
    ////                                   shadowNormalBias: {},
    ////                                   shadowRadius: {},
    ////                                   shadowMapSize: {}
    ////                               } },

    ////            spotLightMap: { value: [] },
    ////            spotShadowMap: { value: [] },
    ////            spotLightMatrix: { value: [] },

    ////            pointLights: { value: [], properties: {
    ////                              color: {},
    ////                              position: {},
    ////                              decay: {},
    ////                              distance: {}
    ////                          } },

    ////            pointLightShadows: { value: [], properties: {
    ////                                    shadowBias: {},
    ////                                    shadowNormalBias: {},
    ////                                    shadowRadius: {},
    ////                                    shadowMapSize: {},
    ////                                    shadowCameraNear: {},
    ////                                    shadowCameraFar: {}
    ////                                } },

    ////            pointShadowMap: { value: [] },
    ////            pointShadowMatrix: { value: [] },

    ////            hemisphereLights: { value: [], properties: {
    ////                                   direction: {},
    ////                                   skyColor: {},
    ////                                   groundColor: {}
    ////                               } },

    ////            // TODO (abelnation): RectAreaLight BRDF data needs to be moved from example to main src
    ////            rectAreaLights: { value: [], properties: {
    ////                                 color: {},
    ////                                 position: {},
    ////                                 width: {},
    ////                                 height: {}
    ////                             } },

    ////            ltc_1: { value: null },
    ////            ltc_2: { value: null }

    ////        },

    {
        "points",{
         {"diffuse", new Uniform<Vector3>(Vector3(1.0,1.0,1.0)) },
         {"opacity", new Uniform<float>(1.0)},
         {"size",  new Uniform<float>(1.0)},
         {"scale",new Uniform<float>(1.0)},
         {"map",new Uniform<float>()},				//texture
         {"alphaMap", new Uniform<float>()},		//texture
         {"alphaTest", new Uniform<float>(0)},
         {"uvTransform", new Uniform<Matrix3>() }
        },
        },

    {
     "sprite",{
                   {"diffuse", new Uniform<Vector3>(Vector3(1.0,1.0,1.0)) },
                   {"opacity", new Uniform<float>(1.0) },
                   {"center", new Uniform<Vector2>(Vector2( 0.5, 0.5 )) },
                   {"rotation",new Uniform<float>(0.0)},
                   {"map", new Uniform<float>() },						//texture
                   {"alphaMap", new Uniform<float>() },					//texture
                   {"alphaTest", new Uniform<float>(0) },
                   {"uvTransform", new Uniform<Matrix3>()},
                }
    }
};

std::map<std::string,IUniform*> UniformsLib::getUniforms(const std::string &name)
{
    return std::map<std::string,IUniform*>();
}

POCELAIN_NAMESPACE_END

